<%-- 
    Document   : ListarDocumentos
    Created on : Nov 21, 2011, 3:29:02 PM
    Author     : elio
--%>

<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>

<!DOCTYPE html>
<html:html>
    <head>
        <title><bean:message key="listar.title"/></title>
        <link rel="stylesheet" type="text/css" href="styles.css"></link>
    </head>
    <body>
        <logic:present name = "docsList">

            <table border="1">
                <thead>
                    <tr>
                        <th><bean:message key="doc.description"/></th>
                        <th><bean:message key="doc.type"/></th>
                        <th><bean:message key="doc.revision"/></th>
                        <th> <bean:message key="prompt.delete" /></th>
                        <th> <bean:message key="prompt.update" /></th>
                    </tr>
                </thead>
                <tbody>
                    <logic:iterate id="doc" name="docsList">
                        <tr>
                            <td><bean:write name="doc" property="descricao" /></td>
                            <td><bean:write name="doc" property="tipo" /></td>
                            <td><bean:write name="doc" property="numRevisao" /></td>
                            <td><html:link page="/ExcluirDocumento.do" paramId="id"
                                       paramName="doc"  paramProperty="id">
                                    <bean:message key="prompt.delete" />
                                </html:link></td>
                            <td><html:link page="/AlterarDocumento.do" paramId="id"
                                       paramName="doc"  paramProperty="id">
                                    <bean:message key="prompt.update" />
                                </html:link></td>
                        </tr>
                    </logic:iterate>
                </tbody>
            </table>
        </logic:present>
    </body>
</html:html>